﻿<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>

<xsl:template match="/">
	<xsl:variable name="Annonces" select="/GlobalVPLink2013/ListeAnnonces/Annonce"/>
	<script type="text/javascript" src="/_layouts/15/VPLink2013/js/Annonces.js"></script>

	<input type="hidden" name="MyAction" value=""/>
	<input type="hidden" name="likedAnnonceID" value=""/>
	<script language="javascript">
			function JAime(annonceID)
			{
				var frm = document.forms[0];
				frm.MyAction.value = "jaime";
				frm.likedAnnonceID.value = annonceID;
				frm.submit();
			}
	</script>

	<div id="content" class="inner_page">
		<xsl:value-of select="/GlobalVPLink2013/Filtre/FilAriane" disable-output-escaping="yes"/>
		<div id="searchNews">
			<div class="search inner_page">
				<table cellpadding="0px" cellspacing="0px"> 
					<tr> 
						<td>
							<input class="vplinksearch inner_page" type="text" value="{/GlobalVPLink2013/Filtre/Titre}" name="FiltreNewsTitre" id="FiltreNewsTitre">
								<xsl:attribute name="onblur">if (this.value == '') {this.value = 'Recherche VPLink';this.style.color='#ccc'}</xsl:attribute>
								<xsl:attribute name="onfocus">if (this.value == 'Rechercher une news') {this.value = '';this.style.color='#000'}</xsl:attribute>
							</input>
						</td>
						<td> 
							<input type="button" value="" onclick="DoSearchNews();" class="vplinksearshVisual"/>
						</td>
					</tr>
				</table>
			</div>
			<xsl:value-of select="/GlobalVPLink2013/Filtre/NavigationPages" disable-output-escaping="yes"/>
		</div>
		<div id="left-column" class="inner_page">
			<xsl:value-of select="/GlobalVPLink2013/Filtre/MenuInterne" disable-output-escaping="yes"/>
			<xsl:value-of select="/GlobalVPLink2013/Filtre/PageCrt" disable-output-escaping="yes"/>
			<xsl:value-of select="/GlobalVPLink2013/Filtre/Categorie" disable-output-escaping="yes"/>
		</div>
		<div id="right-column" class="inner_page artPage">
			<div id="bloc_cat">
				<xsl:variable name="CompteurAnnonces" select="count(/GlobalVPLink2013/ListeAnnonces/Annonce)"/>
				<xsl:for-each select="/GlobalVPLink2013/ListeAnnonces/Annonce">
					<div class="cat_news" style="display: inline-block;">
						<h2>
							<a href="{@LinkDetail}" onclick="javascript:_paq.push(['trackPageView', 'NEWS/{@TitrePiwik}']);"><xsl:value-of select="@Titre"/></a>
						</h2>

						<div class="cat_news-content">
							<xsl:if test="@Photo3 and not(@Photo3 = '')">
								<a class="item_visual" style="float: left; margin-right: 15px;" href="{@LinkDetail}">
									<img src="{@Photo3}" alt="" title=""/>
								</a>
							</xsl:if>
							<div class="item_description">
								<xsl:if test="/GlobalVPLink2013/ConfigurationVP/@Like = 'Article seul'">								
								</xsl:if>
								<xsl:if test="/GlobalVPLink2013/ConfigurationVP/@Like = 'Partout'">
								</xsl:if>
								<p>
									<a href="{@LinkDetail}" onclick="javascript:_paq.push(['trackPageView', 'NEWS/{@TitrePiwik}']);"><xsl:if test="@DatePublication"><b><xsl:value-of select="@DatePublication"/></b> - </xsl:if><xsl:value-of select="@ChapeauCourt"/>
									</a>
								</p>
							</div>
							
						
									
						</div>
								<div class="item_title">
										<span class="item-like">
											<img src="/_layouts/15/VPLink2013/images/picto_like.jpg" height="17" width="19"/>
											<p><xsl:value-of select="@NbLike"/></p>
											<xsl:if test="not(@LikeUserCrt = 'OK')">
												<span class="item-like_text">
													<xsl:variable name="annonceID" select="@ID"></xsl:variable>
													<a href="javascript:JAime({$annonceID});">j'aime</a>
												</span>
											</xsl:if>
											<xsl:if test="@LikeProcessed = 'OK'">
												<span class="item-like_text" style="color:#4f4f4f">
													Like enregistr&#233;	
												</span>
											</xsl:if>
										</span>
									</div>
					</div>
					<xsl:if test="$CompteurAnnonces > position()">
						<div class="bg_middle-news"></div>
					</xsl:if>
				</xsl:for-each>
			</div>
			<span class='messageAucuneArchive'><xsl:value-of select="/GlobalVPLink2013/Context/@Message" disable-output-escaping="yes"/></span>
		</div>
		<div class="bg_bottom-bloc">
		</div>
		<xsl:value-of select="/GlobalVPLink2013/Filtre/NavigationPagesBottom" disable-output-escaping="yes"/>
	</div>
</xsl:template>

</xsl:stylesheet>